]> dgit.raspbian.org Git - gnome-shell.git/commit
network: Don't assume the active connection has been processed first
authorIain Lane <iainl@gnome.org>
Thu, 16 Aug 2018 10:59:36 +0000 (11:59 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 3 Sep 2018 23:31:17 +0000 (23:31 +0000)
commit5d61e2563d183272f604f1a2af635ad5cbdb627e
tree5d2798634248a2da5029c1b19ee0f8fcc401813c
parent72f5802be93648429c6d9d586c427c8cfd9ccde2
network: Don't assume the active connection has been processed first

`NMConnectionDevice._sync()` is responsible for setting up the active
connection that we'll end up displaying. It expects the active
connection to already be in a map `_connectionItems`. If it isn't in
there, we get a null dereference and the indicator can get into a weird
state where it doesn't display devices / connections properly.

Let's change this expectation. If there is an active connection,
`_deviceAdded()` will eventually get to it and call `_sync()` to set up
the active connection state. We make `_sync()` tolerate there being no
active connection when it's called.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/140
js/ui/status/network.js